<html>
<head><meta charset="utf-8"><title>Checking if a type is Clone · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Checking.20if.20a.20type.20is.20Clone.html">Checking if a type is Clone</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="228058685"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Checking%20if%20a%20type%20is%20Clone/near/228058685" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ethan Brierley <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Checking.20if.20a.20type.20is.20Clone.html#228058685">(Feb 27 2021 at 13:32)</a>:</h4>
<p>I am working on some diagnostics. I am wondering what the best way of checking if a <code>Ty</code> is <code>Clone</code> in <code>compiler/rustc_mir/src/borrow_check/diagnostics/conflict_errors.rs</code> would be?</p>



<a name="228059890"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Checking%20if%20a%20type%20is%20Clone/near/228059890" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Checking.20if.20a.20type.20is.20Clone.html#228059890">(Feb 27 2021 at 13:55)</a>:</h4>
<p><a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_trait_selection/traits/fn.type_implements_trait.html">https://doc.rust-lang.org/nightly/nightly-rustc/rustc_trait_selection/traits/fn.type_implements_trait.html</a> probably</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>